home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / CTFASMTT.ZIP / LESSON8.DOC < prev    next >
Text File  |  1994-10-30  |  845b  |  49 lines

  1. LESSON8 - EXTERNALS AND PUBLICS
  2.  
  3. now in order to call a proc from another file, the files
  4. which contains the proc will have to declare the proc
  5. as public :
  6.  
  7. .
  8. .
  9. .
  10.  
  11. public clearscreen
  12.  
  13. clearscreen proc far
  14. .
  15. .
  16. .
  17. ret
  18. endp
  19.  
  20. and in your file you will have to declare the proc as extrn :
  21.  
  22. .
  23. .
  24. .
  25. extrn clearscreen:far
  26. .
  27. .
  28. call clearscreen
  29.  
  30. you can also declare public/extrn global arguments.
  31.  
  32. way of compiling :
  33.  
  34. your file -  prog.asm
  35. extrn file - clear.asm
  36.  
  37. than
  38.  
  39. tasm prog
  40. tasm clear
  41.  
  42. tlink prog clear
  43.  
  44. error can occure in tasm if you didn't define public/extrn and in tlink
  45. if you wont supply the extrns.
  46.  
  47. in this point you know most of assembly but you are lacking of technics
  48. in this point you will have to get sources and analize them, in the
  49. next chapter we will talk about entering info into EXE